package com.leon.spring.day01.demo3;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import com.leon.spring.day01.demo.Demo01;

/**
 * Created by Administrator on 2017/4/15.
 */
public class TestScope {
    public  static  void main(String[] args){
//        singleton 和 prototype
        ApplicationContext ac = new FileSystemXmlApplicationContext("E:\\javaProj\\code\\spring01\\web\\WEB-INF\\applicationContext.xml");
        Demo01 bean1 = ac.getBean("demo01", Demo01.class);
        Demo01 bean2 = ac.getBean("demo01", Demo01.class);

        System.out.println(bean1);
        System.out.println(bean2);

    }
}
